Dynamic Portfolio Allocation in Goal

您所在的位置:网站首页 matlab portfolio Dynamic Portfolio Allocation in Goal

Dynamic Portfolio Allocation in Goal

#Dynamic Portfolio Allocation in Goal| 来源: 网络整理| 查看: 265

Inputs for Investment Wealth Goals

Specify the initial wealth.

W0 = 100;

Specify the target wealth at the end of the investment horizon.

G = 200;

Define the time horizon.

T = 10;

Load the asset information.

load BlueChipStockMoments.matRebalancing Period Actions for Efficient Portfolios

The action at each rebalancing period is to choose the weights of the investment portfolio for the next time period. In this example assume that the possible portfolio weights are assosicated with the portfolios on the efficient frontier. This example also assumes that the choice of possible portfolios is fixed throughout the full investment period. However, weights are not required to be on the efficient frontier. The only requirement is that the set of actions (portfolio choices) remains fixed throughout the investment period.

To simplify the computations, define a finite subset of the efficient portfolios for possible actions. Start by creating a Portfolio object with the asset information from BlueChipStockMoments.mat.

p = Portfolio(AssetList=AssetList,AssetMean=AssetMean,... AssetCovar=AssetCovar);

Annualize the asset returns and the variance-covariance matrix.

p.AssetMean = 12*p.AssetMean; p.AssetCovar = 12*p.AssetCovar;

Use setBounds to add constraints to the portfolio problem. Here, assets do not represent more than 10% of the portfolio wealth and shorting is not allowed.

p = setBounds(p,0,0.1);

Use setBudget to specify that the porfolio must be fully invested.

p = setBudget(p,1,1);

Compute the the weights of 15 portfolios on the efficient frontier using estimateFrontier. These portfolios represent the possible actions at each rebalancing period.

nPortfolios = 15; pwgt = estimateFrontier(p,nPortfolios);

Plot the efficient frontier using plotFrontier.

[prsk,pret] = plotFrontier(p,pwgt);

States for Wealth Nodes

The states are defined as the wealth values at time t. To simplify the problem, discretize the wealth values to generate a wealth grid, Wi, for i∈{1,…,imax}.W1 corresponds to the smallest possible wealth Wmin and Wimax corresponds to the largest possible wealth Wmax. To determine Wmin and Wmax, assume that the evolution of wealth follows a geometric Browninan motion

W(t)=W(0)e(μ-σ 2/2)t+σtZ,

where Z is a standard normal random variable. GBWM does not require that the wealth evolution follow a Brownian motion. However, the technique in this example requires the evolution model to be Markovian. Therefore, this example assumes that the probability of being at a certain state at time t+1 only depends on the state at time t and the action taken.

This example also assumes that Z realistically takes values between -3 and 3. When Z=-3, Wmin corresponds to the smallest value obtained in the trajectory of the Brownian motion setting, μ is the smallest possible portfolio return μmin, and σ is the largest possible portfolio risk σmax. Likewise, when Z=3, Wmax corresponds to the largest value in the trajectory, μ is the largest possible portfolio return μmax, and σ is the largest possible portfolio risk σmax. For Wmax, use σmax because the term in the exponential is increasing for all σ≤3/t; if σmax>3/t, use σ=3/t instead.

Define μmin, μmax, σmin, and σmax.

% Define return limits. mu_min = pret(1); mu_max = pret(end); % Define volatility limits. sigma_min = prsk(1); sigma_max = prsk(end);

The smallest realistic value of W is

Wˆmin=minτ∈{0,1,…,T} {W(0)e(μmin-σmax22)τ-3σmaxτ}.

% Define the minimum possible wealth. timeVec = 0:T; WMinVec = W0*exp((mu_min-(sigma_max^2)/2)*timeVec- ... 3*sigma_max*sqrt(timeVec)); WHatMin = min(WMinVec);

The largest realistic value of W is

Wˆmax=maxτ∈{0,1,…,T} {W(0)e(μmax-σmax22)τ+3σmaxτ}.

% Define the maximum possible wealth. WMaxVec = W0*exp((mu_max-(sigma_max^2)/2)*timeVec+ ... 3*sigma_max*sqrt(timeVec)); WHatMax = max(WMaxVec);

Now, you can fill in the grid points between Wˆmin and Wˆmax. When you set Z=1and t=1 and ignore the drift term (μ-σ2/2)t, note that σ is proportional to the logarithm of the wealth. Thus, you can work in logarithmic space and add a grid point every σmin/ρgrid units. ρgrid is an exogenous parameter that determines the density of the grid. As ρgrid grows, the number of wealth nodes increases.

% Transform to the logarithmic space. lWHatMin = log(WHatMin); lWHatMax = log(WHatMax); % Define the grid in the logarithmic space. rho = 3; lWGrid = (lWHatMin:sigma_min/rho:lWHatMax)';

To guarantee that there exists a point in the wealth grid that matches W(0), shift the logarithmic grid downwards by the smallest shift such that one of those values matches the logarithm of the initial portfolio value.

% Compute the shift for wealth grid. lW0 = log(W0); difference = lWGrid-lW0; minDownShift = min(difference(difference>=0)); % Define the wealth nodes. WGrid = exp(lWGrid - minDownShift); nWealthNodes = size(WGrid,1); % Number of wealth nodesValue Function and Optimal Strategy

The problem in this example is a multi-period optimization problem. The goal is to find the action at each rebalancing period that maximizes the probability that the wealth exceeds the target goal at the end of the investment period. To solve this problem, use the Bellman equation, which in this case is given by

V(Wi(t))=maxπ[∑jV(Wj(t+1))p(Wj(t+1)|Wi(t),π)].

The value function V(Wi(t)) represents the probability of exceeding the wealth goal G at time T, given that at time t, the wealth level is Wi. Simultaneously, p(Wj(t+1)|Wi(t),π) represents the probability of moving to wealth node j at time t+1, given that at time t, you are at wealth node i and you chose portfolio π as the rebalancing action.

Compute Transition Probabilities

Since this example assumes that the wealth goal follows a geometric Brownian motion, the transition probabilities of being in wealth node Wj at time t+1, given that you are at wealth node Wi at time t, are time-homogeneous. Thus, the transition probability for a given portfolio choice π is defined as

p(Wj(t+1)|Wi(t),π)=P(Wj≤W(t+1)



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3